<div class="notice_box">
  <div  *ngIf="!rollNotice.isAddNotice" class="notice_hearder clearfix">
     <div class="add_notice">
       <span>添加公告</span>
       <div class="add" (click)="rollNotice.isAddNotice = true"></div>
     </div>
    <div class="notice_status f_r ">
      <div class="now_status " (click)="rollNotice.selectStatus('已发布')" [ngClass]="{select:rollNotice.isNow}">已发布</div>
      <div class="delete_status  " (click)="rollNotice.selectStatus('回收站')" [ngClass]="{select:rollNotice.isDelete}">回收站</div>
    </div>
  </div>
  <div *ngIf="!rollNotice.isAddNotice" class="notice_center clearfix">
    <div  (click)="rollNotice.isEditor=!rollNotice.isEditor" class="setting" [ngClass]="{'setting1':rollNotice.isEditor}" nzTitle="设置" nzPlacement="topCenter" nz-tooltip></div>
    <div class="now_notices"  *ngIf="rollNotice.isNow">
      <div class="tip" *ngIf="rollNotice.nowNoticeArr.length==0">暂时还没有公告，快去<span (click)="rollNotice.isAddNotice = true">添加</span>公告吧~~</div>
    <div class="now_notice clearfix"  *ngFor="let notice of rollNotice.nowNoticeArr;let i = index" >
      <div class="notice_title">{{notice.Title}}</div>
      <div class="notice_content" [innerHTML]="notice.Content|toHTML" [ngClass]="{'content_max_height':notice.isShowMore}"></div>
      <div class="notice_setting clearfix" >
        <img src="/assets/img/rollIndex/xiugai.png" alt="" *ngIf="rollNotice.isEditor" (click)="updateNotice(i)">
        <img src="/assets/img/rollIndex/shanchu.png" alt="" *ngIf="rollNotice.isEditor" (click)="deleteNotice(notice.PK_NoticeGuid,i)">
        <div class="show_all f_r" *ngIf="notice.isShowMore||notice.isShowMore1" (click)="notice.isShowMore=!notice.isShowMore;notice.isShowMore1=!notice.isShowMore1">{{notice.isShowMore1?'收起':'展开'}}</div>
      </div>
      <div class="notice_bottom clearfix">
        <div class="notice_send" >
          <span class="send">发向：</span>
          <div (click)="getNoticeStudentList(notice)">(<span>{{notice.Num}}人</span>)</div>
        </div>
        <div class="notice_time f_r">
          <span>发表于：</span>
          <span class="date">{{notice.PublicTime}}</span>
        </div>
        <div class="send_peoples" *ngIf="notice.showSendStus">
          <div class="send_logo"></div>
          <div class="peoples">
            <ul>
              <li *ngFor="let stu of notice.PublicObject">
                <div class="stu_img" [style.background-image]="'url('+(stu.HeadPhotoPath?(utilServe.readImgUrl+stu.HeadPhotoPath):rollNotice.defaultImg)+')'"></div>
                <div class="stu_name">{{stu.Name}}</div>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </div>
    </div>
    <div class="delete_notices" *ngIf="rollNotice.isDelete" >
      <div class="tip" *ngIf="rollNotice.deleteNoticeArr.length == 0">您还没有已经删除的公告</div>
    <div class="delete_notice clearfix" *ngFor="let notice of rollNotice.deleteNoticeArr;let i = index;" >
      <div class="notice_title">{{notice.Title}}</div>
      <div class="notice_content" [innerHTML]="notice.Content|toHTML" [ngClass]="{'content_max_height':notice.isShowMore}"></div>
      <div class="notice_setting clearfix" >
        <img src="/assets/img/rollIndex/huifu.png" alt="" *ngIf="rollNotice.isEditor" (click)="recoverNotice(notice.PK_NoticeGuid,i)">
        <div class="show_all f_r" *ngIf="notice.isShowMore||notice.isShowMore1" (click)="notice.isShowMore=!notice.isShowMore;notice.isShowMore1=!notice.isShowMore1" >{{notice.isShowMore1?'收起':'展开'}}</div>
      </div>
      <div class="notice_bottom clearfix">
        <div class="notice_send" >
          <span class="send">发向：</span>
          <div (click)="getNoticeStudentList(notice)">(<span>{{notice.Num}}人</span>)</div>
        </div>
        <div class="notice_time f_r">
          <span>发表于：</span>
          <span class="date"> {{notice.PublicTime}}</span>
        </div>
        <div class="send_peoples" *ngIf="notice.showSendStus">
          <div class="send_logo"></div>
          <div class="peoples">
            <ul>
              <li *ngFor="let stu of notice.PublicObject">
                <div class="stu_img"  [style.background-image]="'url('+(stu.HeadPhotoPath?(utilServe.readImgUrl+stu.HeadPhotoPath):rollNotice.defaultImg)+')'"></div>
                <div class="stu_name">{{stu.Name}}</div>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </div>
    </div>
  </div>
  <app-add-notice
    *ngIf="rollNotice.isAddNotice"
    (onCloseAddNotice) = "rollNotice.onCloseAddNotice($event)"
    [rollGuid]="rollNotice.rollGuid"
    [notice]="rollNotice.nowNoticeArr[rollNotice.updateIndex]"
  >
  </app-add-notice>
</div>

